<template>
	<view class="" style="display: flex;flex-direction: column;justify-content: center;align-items: center;height: 100vh;">
			
		<view class="" style="width: 325rpx;border-radius: 4rpx;box-sizing: border-box;background-color: #FF4D4F;">
			<button  class="" style="background-color: #FF4D4F;" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
				<text style="border: 4rpx;font-family: Roboto;color: #FFFFFF;"> 登陆</text>
			</button>
		</view>	
		<div style="font-size: 28rpx;margin-top: 20rpx;display: flex;flex-direction: row;justify-content: center;">这里是登录相关的协议 <text style="color:#FA0404;font-size: 28rpx;">《登录协议》</text></div>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		
		methods: {
			getPhoneNumber(e){
					var phoneCode = e.detail.code; //获取手机号
					let that = this
					console.log("获取手机号："+e)
					console.log("获取手机号code："+phoneCode)
					this.$pin.loginFromWechat(
						(successRes) => {
							uni.reLaunch({
								url: '/pages/tab-bar/home'
							})
				
						},
						(error) => {
							uni.showToast({
								icon: 'fail',
								title: error.message,
								duration:3000
							})
						}, phoneCode);
						
			}
		}
	}
</script>

<style>

</style>
